package org.fxcontainer.commands
{
	import com.developmentarc.core.actions.commands.AbstractCommand;
	
	/**
	 * The process navigation command. <br/>
	 * Is used to navigate to a specific page with abilities to invoke control on thid page. 
	 * @author Izzet_Mustafayev
	 */
	public class ProcessNavigateCommand extends AbstractCommand
	{
		/**
		 * Command type for page navigation. 
		 */
		static public const PAGE_NAVIGATE_CMD:String = "org.fxcontainer.commands.ProcessNavigateCommand.PAGE_NAVIGATE_CMD";
		
		/**
		 * Command type for page navigation with control invocation.
		 */
		static public const PAGE_CTRL_INVOKE_CMD:String = "org.fxcontainer.commands.ProcessNavigateCommand.PAGE_CTRL_INVOKE_CMD";
		
		/**
		 * The page name.
		 */
		private var _pageName:String;
		
		/**
		 * The control name. 
		 */
		private var _controlName:String;
		
		/**
		 * The method name. 
		 */
		private var _methodName:String;
		
		/**
		 * The method arguments. 
		 */
		private var _methodArgs:Array;
		
		/**
		 * <code>ProcessNavigateCommand</code> command constructor. 
		 * @param type the command type.
		 * @param pageName the page name to navigate to
		 * @param controlName the control name to invoke
		 */
		public function ProcessNavigateCommand(type:String, pageName:String=null, controlName:String=null)
		{
			super(type);
			this._pageName = pageName;
			this._controlName = controlName;
		}
		
		public function get pageName():String
		{
			return this._pageName;
		}
		
		public function get controlName():String
		{
			return this._controlName;
		}
		
		public function set methodName(methodName:String):void
		{
			this._methodName = methodName;
		}
		
		public function get methodName():String
		{
			return this._methodName;
		}
		
		public function set methodArgs(methodArgs:Array):void
		{
			this._methodArgs = methodArgs;
		}
		
		public function get methodArgs():Array
		{
			return this._methodArgs;
		}
	}
}